package com.cms.service.impl;

import com.cms.dao.entity.UserEntity;
import com.cms.dao.mapper.UserMapper;
import com.cms.service.api.IUserService;
import com.cms.service.converter.UserConverter;
import com.cms.service.dto.UserDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author laolang
 * @version 1.0.0
 * @ClassName UserPrimaryServiceImpl
 */
@Service
public class UserServiceServiceImpl implements IUserService {

    @Autowired
    private UserMapper uerMapper;

    @Override
    public UserDto findByUsername(String username) {
        UserEntity userEntity= uerMapper.findByUsername(username);
        UserDto userdto = UserConverter.CONVERTER.entityToDto(userEntity);
        return  userdto ;
    }


}
